package lab04.test01;

public class HelloWorldThread extends Thread {
    public void run() {
        while (true) {
            System.out.println("Hello,World");

            //等一秒
            try {
                Thread.sleep(1000);//（）内单位为毫秒
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}